package com.reservation.common;


/**
 * 业务异常类
 */
public class BusinessException extends RuntimeException {

    /**
     * 错误码
     */
    private  Integer code;

    /**
     * 错误消息
     */
    private  String message;

    public BusinessException(String message) {
        this(500, message);
    }
    /**
     * 构造函数
     *
     * @param code    错误码
     * @param message 错误消息
     */
    public BusinessException(Integer code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }
}